<div class="downloads form">
	<?php echo $this->BootstrapForm->create('Download', array('type' => 'file'));?>
	<fieldset>
		<legend><?php echo __('Add Download'); ?></legend>
		<?php echo $this->BootstrapForm->input('category_id', array('validate' => 'required:true', 'label' => __('Post Category'), 'escape' => false)); ?>
		<?php echo $this->BootstrapForm->input('title', array('validate' => 'required: true', 'class' => 'required')); ?>
		<?php echo $this->BootstrapForm->input('publish_date', array('type' => 'text', 'value' => date('Y-m-d'), 'class' => 'datepicker', 'label' => __('Publish Date'))); ?>
		<?php echo $this->BootstrapForm->hidden('Attachment.0.model', array('value' => 'Download')); ?>
		<?php
			echo $this->BootstrapForm->input('Attachment.0.file', array(
				'label' => __('File'),
				'type'  => 'file',
				'error' => array(
					'error'      => __('An error occured while transferring the file.'),
					'resource'   => __('The file is invalid.'),
					'access'     => __('The file cannot be processed.'),
					'location'   => __('The file cannot be transferred from or to location.'),
					'permission' => __('Executable files cannot be uploaded.'),
					'size'       => __('The file is too large.'),
					'pixels'     => __('The file is too large.'),
					'extension'  => __('The file has the wrong extension.'),
					'mimeType'   => __('The file has the wrong MIME type.'),
				),
			));
		?>

	</fieldset>
	<?php echo $this->BootstrapForm->end(__('Submit'));?>
</div>

<?php echo $this->start('sidebar'); ?>
<?php echo $this->element('menu'); ?>
<?php echo $this->end(); ?>
